<?php
define('INDEX',true);
include $_SERVER['DOCUMENT_ROOT'].'/backend/_config/db_connection.php';

$connect=mysql_connect($database['server'],$database['user'],$database['pwd']) or die('Die');
mysql_select_db($database['name'],$connect);

if(isset($_REQUEST['id'])) {
	$sql="select id, name from model where manu_id = ".$_REQUEST['id'] ;
} else {
	$sql="select id, name from manufacture where type = ".$_REQUEST['type'] ;
}
$rs=mysql_query($sql);
$response = '<option value="">-----</option> ';
while ($row = mysql_fetch_array($rs)) {
	//$response .= $row['id'].','.$row['name'].'|';
	$response .= '<option value="'.$row["id"].'" style="color:red;">&#8250; '.utf8_encode($row["name"]).'</option>';
}
echo $response;
?>